package cn.school.test;

import org.apache.ibatis.session.SqlSession;

import cn.school.dao.ExamResultDao;
import cn.school.dao.StudentDao;
import cn.school.util.MyBatisUtil;
import cn.shcool.entity.ExamResult;

public class ExamTest {
	public static void main(String[] args) {
		SqlSession sqlSession = MyBatisUtil.get();
		ExamResultDao exdao = sqlSession.getMapper(ExamResultDao.class);
		ExamResult ex = exdao.get(3);
		System.out.println("考试信息" + ex);
		System.out.println("课程信息" + ex.getSubject());
		System.out.println("学生信息" + ex.getStudent());
		MyBatisUtil.close(sqlSession);
	}
}